package com.mt.api.modules.controller;

import com.mt.api.modules.service.IAppUploadService;
import com.mt.common.response.WebResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: plover
 * @Date: 2021/12/31 4:59 下午
 * @Description:
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "上传管理")
@RequestMapping("/app/upload")
public class AppUploadController {

    private final IAppUploadService appUploadService;

    @RequestMapping(value = "/pic")
    @ApiOperation(value = "", notes = "图片上传接口", httpMethod = "GET")
    public WebResponse picUpload(@RequestParam("file") MultipartFile file) {
        return appUploadService.picUpload(file);
    }
}
